<html class="hb-loaded">
 <head> 
  <meta content="text/html;charset=utf-8" http-equiv="Content-Type" /> 
  <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" /> 
  <meta content="yes" name="apple-mobile-web-app-capable" /> 
  <meta content="black" name="apple-mobile-web-app-status-bar-style" /> 
  <title>用户登录</title> 
  <link rel="stylesheet" href="css/bootstrap.min.css" /> 
  <link rel="stylesheet" href="css/public.css" /> 
 
  <script src="js/jquery.min.js"></script> 
  <script src="js/ygop.ajax.client.js"></script> 
  <script src="js/bootstrap.min.js"></script> 
  <link rel="stylesheet" href="css/layer.css" /> 
  <script src="js/layer.m.js"></script> 
  <script src="js/Common.js"></script> 




 </head> 
 <body> 
  <link rel="stylesheet" href="css/login.css?v20150819" /> 
  <!--header>
    <div class="header">
        <a class="backBtn" href="javascript:void(0)"><span>返回</span></a>
        <h1>用户登录</h1>
    </div>
</header--> 
  <div class="wrap"> 
   <form> 
    <div class="input-item"> 
     <div class="input-item-list username"> 
      <span class="icon-username"></span> 
      <input type="text" placeholder="请输入您的用户名" id="username" /> 
     </div> 
     <div class="input-item-list password"> 
      <span class="icon-password"></span> 
      <input type="password" placeholder="请输入您的密码" id="password" /> 
     </div> 
    </div> 
    <!--div class="automatic_login">
        <label>
            <input type="checkbox">自动登录
        </label>
        </div--> 
    <div class="btn-login clearfix"> 
     <button onclick="goBack()" type="button" class="btn_white myleft">返回</button> 
     <button class="btn_green myright" type="button" id="btnLogin">登录</button> 
    </div> 
    <div class="login-option"> 
     <span class="retrieve_password"> <a href="forget.html">忘记密码</a> </span> 
     <span class="register"> <a href="reg.html">新用户注册</a> </span> 
    </div> 
    <div class="login-other"> 
     <dl> 
      <dt>
       -----------&nbsp;第三方登录&nbsp;-----------
      </dt> 
      <dd> 
       <a class="qq" href="\Account\QQLogin" id="btnQQLogin">QQ</a> 
       <a class="weibo" href="\Account\WeiBoLogin" id="btnWeiBoLogin">新浪微博</a> 
      </dd> 
     </dl> 
    </div> 
   </form> 
  </div> 
  <script type="text/javascript">
    $(document).ready(function () {
        $("#btnLogin").click(function () {
            var user = {};
            user.UserName = $("#username").val().trim();
            user.Pwd = $("#password").val().trim();
            if (user.UserName == "")
            {
                YgmJsCommon.popups.alert("用户名不能为空！");
                return;
            }
            if (user.Pwd == "") {
                YgmJsCommon.popups.alert("密码不能为空！");
                return;
            }

            $("#btnLogin").text("正在处理中..").attr("disabled", "disabled");
            ygopAjaxClient.async("/Account/YgUserLogin", "post", user, function (e) {
                $("#btnLogin").text("登录").removeAttr("disabled");
                if (e.RspCode == 1) {
                   // dplus.track("登录", { way : "yiguo" } );
                    location.href = e.RspData.returnUrl;
                }
                else if (e.RspCode == 2)
                {
                    dplus.track("未激活");
                    YgmJsCommon.popups.alert(e.RspMsg, function () {
                        location.href = e.RspData.url;
                    });
                }
                else {
                    YgmJsCommon.popups.alert(e.RspMsg);
                }
            });
        });
    });

    function goBack() {
        history.go(-1);
    }
</script> 
 </body>
</html>